//
//  WHWebserviceTool.m
//  WHPersonalData
//
//  Created by shengmeng chen on 2021/6/18.
//  Copyright © 2021 mac. All rights reserved.
//

#import "WHWebserviceTool.h"
#import "NSString+Base64.h"
#import "WebserviceUtility.h"

@implementation WHWebserviceTool

+(void)webserviceWithPostSessionManagerWithURL:(NSString *)urlString withParams:(NSString *)paramsStr success:(void (^)(id  responseObject))success
                      failure:(void (^)(NSError *error))failure
{
    // 请求参数
    NSString *soapStr = [NSString stringWithFormat:
                         @"<REQUEST><cs>%@</cs></REQUEST>",paramsStr];
    //base64编码
    NSString*base64Content =[soapStr base64EncodedString];
    //base64编码
    NSArray*params =@[@{@"content":base64Content},@{@"extinfo1":@""},@{@"extinfo2":@""}];
    [WebserviceUtility soapWithPostSessionManagerWithURL:urlString withMethodName:@"getPageListInfo" withParams:params success:^(id  _Nonnull responseObject) {

        success(responseObject);
        } failure:^(NSError * _Nonnull error) {

            failure(error);
        }];
}

@end
